import $ajax from '@/utils/axios'

export const LoadTabbars=()=>$ajax("/getTabbars") //加载底部页签

export const initNavbars=()=>$ajax("/getNavbars")

export const shopDetails=(data)=>$ajax("/shopDetails",data) //商家详情
export const shopList=()=>$ajax("/shopList",{},"POST")
export const login=(data)=>$ajax("/login",data,"POST")

export const getuserInfo=()=>$ajax("/getUserInfo",{},"POST")
export const userLogout=()=>$ajax("/LogOut")
export const userRegister=(data)=>$ajax("/Register",data,"POST")

export const searchGoods=(data)=>$ajax("/searchGoods",data,"POST")
// 修改用户个人资料
export const updateName=(data)=>$ajax("/updateSkinName",data,"POST")
export const updatePhone=(data)=>$ajax("/updatePhone",data,"POST")
export const updateGxqm=(data)=>$ajax("/updateGxqm",data,"POST")

export const updatePwd=(data)=>$ajax("/updatePwd",data,"POST")

export const getWeather=(data)=>$ajax("/getWeather",data,"POST")
export const updateZxb=(data)=>$ajax("/UserUpdateZxbNum",data,"POST")

// 获取收货地址
export const inituserAddress=()=>$ajax("/initUserAddress")
export const saveAddress=(params)=>$ajax("/saveUserBaseAddress",params,"POST")
// 修改默认收货地址
export const updateDefaultAddress=(data)=>$ajax("/updateUserDefaultAddress",data,"PUT")

// 加载商家详情
export const LoadmerchantDetails=(data)=>$ajax("/initMerchantDetails",data)

// 充值余额
export const rechargeUserMoney=(data)=>$ajax("/rechargeCertMoney",data,"POST")